<jsp:directive.page session="true" />
<jsp:directive.page import="dasregistry.serverBean"/>
<jsp:useBean id="register" class="dasregistry.registryBean" scope="session"/> 
<jsp:useBean id="server" class="dasregistry.serverBean" scope="session"/> 

<jsp:directive.page import="org.biojava.dasobert.dasregistry.DasCoordinateSystem"/>
<jsp:directive.page import="org.biojava.dasobert.dasregistry.DasCoordSysComparator"/>
<jsp:directive.page import="org.biojava.services.das.registry.DasRegistrySql" />
<jsp:directive.page import="java.util.Comparator"/>

<%@ page import="org.biojava.services.das.dao.Role" %>
<%@ page import="org.biojava.services.das.dao.RegistryUser" %>
<%@ page import="org.biojava.services.das.registry.UserManager" %>
<%@ page import="java.util.List" %>
<jsp:directive.page import="org.springframework.beans.factory.BeanFactory"/>
<jsp:directive.page import="org.springframework.context.support.ClassPathXmlApplicationContext"/>

<%@ include file="logincheck.jsp" %>

<% String title="Register DAS 1 Server";
   String header=title;
   
   BeanFactory ctx=(new ClassPathXmlApplicationContext("SpringDAO.xml"));
		DasRegistrySql registry=(DasRegistrySql)ctx.getBean("registryBean");
%>


<%@ include file="sangerheader.jsp" %>

<div id="main">

<%
if ( email == null ) {
	%>
	<%@ include file="needToLogIn.jsp" %>
	<% 
	}else{
%>

<h2> Step 1/2 Register a New DAS 1 Server </h2>

<p>
<form method="post" action="registerServerTest.jsp" name="register_form">
<%@ include file="sangertablestart.jsp" %>

<!--<form method="post" action="registertestcodes.jsp" name="register_form">-->


<!-- title/nickname -->
     
     Path to the server sources document:
     
     <input type="input" name="sourcesPath" id="sourcesPath" size="40" value="<%
     String serverPath = server.getSourcesPath();
     out.print(serverPath);
     %>"/>
	 <a href="help_server.jsp">help</a><br/>
	 
    e.g. http://das.sanger.ac.uk/das/sources<br/>
    Please give a description of the data your server is serving or the institute name and department it represents:
    <input type="input" name="description" id="description" size="40" value="<%
     String serverDescription = server.getDescription();
     out.print(serverDescription);
     
     %>"/>
     <br/>
     <input type="submit" value="save data and goto next step">

</form>

<%
}//end of loged in else statement%>
<%@ include file="sangertableend.jsp" %>


<p>

</div>
<%@ include file="sangerfooter.jsp" %>


